<!DOCTYPE html>
<html lang="en" xmlns:th="http://www.thymeleaf.org" th:fragment="imageBody">
<head>
</head>
<body>
<div>
    <img class="targetImage" th:attr="data-original=${mediaUrl}" th:src="${mediaUrl}"/>
</div>

<script th:src="@{lib/viewer/js/viewer.js}"></script>
<script th:src="@{lib/viewer/js/main.js}"></script>
<script th:inline="javascript">
    $(document).ready(function () {
        var options = {
            inline: true,
            navbar: false,
            transition: true,
            minHeight: 500,
            tooltip: false,
            objIdForHeight: mediaBody
        };
        $('.targetImage').viewer(options);
    });
</script>
</body>
</html>